Swap Two Variables | Python
a = 5
b = 10
temp = a
a = b
b = temp
print('The value of a after swapping: {}'.format(a))
print('The value of b after swapping: {}'.format(b))a = 5
b = 10
temp = a
a = b
b = temp
print('The value of a after swapping: {}'.format(a))
print('The value of b after swapping: {}'.format(b))
This is an official account managed by the team TutorialsLink Community